<?php
    
    class ElementTopbarServer extends Element {
        public function Render() {
            global $server;
            global $config;

            $servers = array_keys( $config );

            ?><div class="item">
                <a href="" onclick=""><img src="images/server.png" alt="server" title="Server" /></a>
                <select id="serverselect" name="server" onchange="Server.Select( this )"><?php
                    foreach ( $servers as $name ) {
                        ?><option<?php
                        if ( $name == $server[ 'name' ] ) {
                            ?> selected="selected"<?php
                        }
                        ?>><?php
                        echo $name;
                        ?></option><?php
                    }
                ?></select>
            </div><?php
        }
    }

?>
